<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/commons/jsp/taglibs.jsp"%>
<%@taglib uri="http://www.framework.com/taglib/tree" prefix="tree"%>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<style type="text/css">
li {
	padding-top: 8px;
}
</style>
<form name="myform" id="myform" method="post" action="">
	<input type="hidden" name="projectId" value="${pro.id}" />
	<input type="hidden" name="auctionPublicity" value="${auctionPublicity}" />
	<input type="hidden" name="fileId" value="">
	<table class="infoTable">
		<tbody>
		    <tr>
		      <th class="key" cosplan="2">原竞拍日期：</th>
		      <td><fmt:formatDate value="${pro.auctionStart}" pattern="yyy年MM月dd日 HH点"/></td>
		    </tr>
		          <tr>
					<th class="key" cosplan="2">重置竞拍日期：</th>
					     <td cosplan="2"><input type="text" class="easyui-datebox"   name="bidStartDateStr" id="bidStartDateStr"  data-options="required:true,validType:[' isWorkDayJ[\'${ctx }\',\'${dataset.auctionPublicity}\']']"/> -
							 <select name='bidStartTimeStr' id="bidStartTimeStr" class="easyui-combobox" style="width:50px" data-options="required:true,validType:[<c:if test="${dataset.bidOpeningInTheMonAm==true}"></c:if><c:if test="${dataset.bidOpeningInTheMonAm==false}">'isMonAm'</c:if>]">
								<option value='09' ${pro.auctionStart.getHours()==09?"selected='selected'":""}>09</option>
								<option value='15' ${pro.auctionStart.getHours()==15?"selected='selected'":""}>15</option>
							 </select>点 <font color="red">注：非工作日不允许设置项目竞拍日期</font>
					     </td>
			      </tr>
		</tbody>
	</table>
</form>

<script type="text/javascript">
//确认截止时间与开标时间需间隔3天以上
//开标时间不能为星期一上午
	$.extend($.fn.validatebox.defaults.rules, {
		isMonAm: {
			 validator: function (value, param) {
				var bidStartDateStr=$("input[name='bidStartDateStr']").val();
				var endDate = new Date(bidStartDateStr.replace(/-/g,"/"));
				
				if(endDate.getDay()==1&&value==09){//开标时间校验（不能为星期一上午）
					return false;
				}
				return true; 
			 },
			 message: '开标时间不能为星期一上午'
		 }
	 });

	
</script>
